<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>forin forof</title>
</head>
<body>
    
    <script>
    

        {
            let ary = [1,2,3,4,5,6];

            let obj = {
                name: 'ws',
                age: 200
            };

            for (const key in obj) {
                if (obj.hasOwnProperty(key)) {
                    const element = obj[key];
                    console.log('key',key);
                    console.log('element',element);
                }
            }

            for (const iterator of ary) {
                console.log('iterator',iterator);
            }

            

        }

    </script>

</body>
</html>